package com.ruoyi.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.domain.ConlumnMenu;
import com.ruoyi.mapper.ConlumnMenuMapper;
import com.ruoyi.service.ConlumnMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ConlumnMenuServiceImpl extends ServiceImpl<ConlumnMenuMapper, ConlumnMenu> implements ConlumnMenuService {

    @Autowired
    private ConlumnMenuMapper conlumnMenuMapper;
    @Override
    public Boolean deleteConlumnMENUById(Integer id) {
        LambdaQueryWrapper<ConlumnMenu> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(ConlumnMenu::getParentId,id);
        return conlumnMenuMapper.selectList(queryWrapper).size()>0?false:true;
    }
}
